package cn.lstf666.springboot.web;

import cn.lstf666.springboot.model.Student;
import cn.lstf666.springboot.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class indexController {

    @Autowired
    private StudentService studentService;

    @RequestMapping("/getS")
    public Student getStudent(Integer id){

        Student student = studentService.getStudentById(id);

        return student;
    }
}
